package io.renren.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.sys.dao.SysNameDao;
import io.renren.modules.sys.entity.SysNameEntity;
import io.renren.modules.sys.service.SysNameService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("sysNameService")
public class SysNameServiceImpl extends ServiceImpl<SysNameDao, SysNameEntity> implements SysNameService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SysNameEntity> page = this.page(
                new Query<SysNameEntity>().getPage(params),
                new QueryWrapper<SysNameEntity>()

        );
        return new PageUtils(page);
    }

    @Override
    public SysNameEntity findOne() {
        return baseMapper.findOne();
    }
}
